Skip to content

CNTRLPLANE-2186: Add automated Jira issue fixing for HyperShift using Claude Code - #70147

Merged
openshift-merge-bot[bot] merged 4 commits into
openshift:masterfrom
bryan-cox:hypershift-jira-agent
Jan 29, 2026
Merged

openshift-merge-bot[bot] merged 4 commits into
openshift:masterfrom
bryan-cox:hypershift-jira-agent

Conversation

@bryan-cox

@bryan-cox bryan-cox commented Oct 9, 2025

Copy link
Copy Markdown
Member

Summary

Add automated Jira issue processing workflow for HyperShift that uses Claude Code to analyze issues and create draft PRs with fixes.

What it does

  1. Queries Jira for unresolved issues matching the criteria below
  2. Clones ai-helpers repository to get the /jira-solve command
  3. Runs Claude Code with the /jira-solve command to analyze each issue and implement a fix
  4. Creates draft PRs from the hypershift-community/hypershift fork to openshift/hypershift
  5. Updates Jira after successful processing:
    • Adds agent-processed label
    • Transitions to "ASSIGNED" (OCPBUGS) or "Code Review" (CNTRLPLANE)
    • Sets assignee to hypershift-automation

Jira Query

project in (OCPBUGS, CNTRLPLANE)
  AND resolution = Unresolved
  AND status in (New, "To Do")
  AND labels = issue-for-agent
  AND labels != agent-processed

Workflow steps

  • Setup: Verifies Claude CLI is available
  • Process: Queries Jira, clones repos, runs Claude for each issue, pushes branches, creates PRs, updates Jira status

Configuration

  • Runs weekly on Mondays at 8:30 AM UTC
  • Processes 1 issue per run (configurable via JIRA_AGENT_MAX_ISSUES)
  • 60 second rate limit between issues
  • Uses GitHub App tokens for authentication (separate tokens for fork and upstream)
  • Uses git credential helper to prevent token leaking in logs
  • Uses Jira PAT for label/status/assignee updates

Files added

  • ci-operator/step-registry/hypershift/jira-agent/ - Workflow and step definitions
  • ci-operator/config/openshift/hypershift/openshift-hypershift-main.yaml - Periodic job config

The PRs created from this job can be tracked here - https://github.com/openshift/hypershift/pulls?q=is%3Apr+author%3Aapp%2Fhypershift-jira-solve-ci+

🤖 Generated with Claude Code

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 9, 2025
@openshift-ci

openshift-ci Bot commented Oct 9, 2025

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci Bot added the do-not-merge/invalid-owners-file Indicates that a PR should not merge because it has an invalid OWNERS file in it. label Oct 9, 2025
@bryan-cox
bryan-cox force-pushed the hypershift-jira-agent branch from 13a8692 to 8641f4e Compare November 5, 2025 19:29
@bryan-cox bryan-cox changed the title Hypershift-jira-agent CNTRLPLANE-2186: Hypershift-jira-agent Dec 5, 2025
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Dec 5, 2025
@openshift-ci-robot

openshift-ci-robot commented Dec 5, 2025

Copy link
Copy Markdown
Contributor

@bryan-cox: This pull request references CNTRLPLANE-2186 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target either version "4.21." or "openshift-4.21.", but it targets "openshift-4.22" instead.

Details

In response to this:

Add daily periodic job that automatically processes Jira issues using
the hypershift-jira-agent workflow.

Configuration:

  • Runs daily at 9:00 AM UTC
  • Processes maximum 1 issue per run (JIRA_AGENT_MAX_ISSUES=1)
  • Uses hypershift-jira-agent workflow from step-registry

The job queries Jira for issues with 'issue-for-agent' label and runs
the /jira-solve command non-interactively to create draft PRs.

Initial configuration starts with 1 issue per day for safe testing and
validation. Can be increased to 5, 10, or higher once validated.

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@bryan-cox
bryan-cox force-pushed the hypershift-jira-agent branch from 2678917 to 62b5014 Compare December 5, 2025 18:44
@bryan-cox
bryan-cox force-pushed the hypershift-jira-agent branch 4 times, most recently from 9f6829c to d24eb1b Compare December 8, 2025 18:01
@bryan-cox

Copy link
Copy Markdown
Member Author

/verify-owners

@openshift-ci

openshift-ci Bot commented Dec 8, 2025

Copy link
Copy Markdown
Contributor

The following users are mentioned in OWNERS file(s) but are untrusted for the following reasons. One way to make the user trusted is to add them as members of the openshift org. You can then trigger verification by writing /verify-owners in a comment.

  • sjennings
    • User is not a member of the org. User is not a collaborator. Satisfy at least one of these conditions to make the user trusted.
    • ci-operator/step-registry/hypershift/jira-agent/OWNERS
    • ci-operator/step-registry/hypershift/jira-agent/process/OWNERS
    • ci-operator/step-registry/hypershift/jira-agent/report/OWNERS
    • ci-operator/step-registry/hypershift/jira-agent/setup/OWNERS

@openshift-bot

Copy link
Copy Markdown
Contributor

Issues in openshift/release go stale after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 15d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 7, 2026
@openshift-ci openshift-ci Bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 7, 2026
@bryan-cox
bryan-cox force-pushed the hypershift-jira-agent branch from d24eb1b to 3dd1580 Compare January 9, 2026 11:43
@bryan-cox

Copy link
Copy Markdown
Member Author

/remove-lifecycle stale

@openshift-ci openshift-ci Bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 9, 2026
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 9, 2026
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 9, 2026
@bryan-cox
bryan-cox force-pushed the hypershift-jira-agent branch 3 times, most recently from 5d42eaa to c5c7cdf Compare January 9, 2026 12:49
@bryan-cox
bryan-cox force-pushed the hypershift-jira-agent branch from c5c7cdf to cf650a0 Compare January 9, 2026 12:52
@bryan-cox

Copy link
Copy Markdown
Member Author

/pj-rehearse periodic-ci-openshift-hypershift-main-periodic-jira-agent

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@bryan-cox: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jan 28, 2026
@bryan-cox

Copy link
Copy Markdown
Member Author

/pj-rehearse periodic-ci-openshift-hypershift-main-periodic-jira-agent

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@bryan-cox: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@bryan-cox

Copy link
Copy Markdown
Member Author

/pj-rehearse periodic-ci-openshift-hypershift-main-periodic-jira-agent

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@bryan-cox: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

bryan-cox and others added 2 commits January 28, 2026 09:07
… Agent

Add CLAUDE_MODEL environment variable to explicitly specify the Claude
model used for processing Jira issues. Defaults to claude-opus-4-5-20251101.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Change the periodic-jira-agent job schedule from daily at 9:00 AM UTC
to weekly on Mondays at 8:30 AM UTC. This reduces the frequency of
automated Jira issue processing runs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bryan-cox
bryan-cox force-pushed the hypershift-jira-agent branch from 575ae93 to ddb6ad1 Compare January 28, 2026 14:07
@bryan-cox

Copy link
Copy Markdown
Member Author

/pj-rehearse periodic-ci-openshift-hypershift-main-periodic-jira-agent

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@bryan-cox: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-ci openshift-ci Bot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 28, 2026
@bryan-cox

Copy link
Copy Markdown
Member Author

/pj-rehearse periodic-ci-openshift-hypershift-main-periodic-jira-agent

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@bryan-cox: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@bryan-cox

Copy link
Copy Markdown
Member Author

/hold cancel

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 29, 2026
@bryan-cox

Copy link
Copy Markdown
Member Author

/pj-rehearse ack

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@bryan-cox: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-ci-robot openshift-ci-robot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Jan 29, 2026
@enxebre

enxebre commented Jan 29, 2026

Copy link
Copy Markdown
Member

/approve
/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jan 29, 2026
@deepsm007

Copy link
Copy Markdown
Contributor

/lgtm
🚀

@openshift-ci

openshift-ci Bot commented Jan 29, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bryan-cox, deepsm007, enxebre

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 29, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit c94719a into openshift:master Jan 29, 2026
17 of 18 checks passed
bryan-cox added a commit to bryan-cox/release that referenced this pull request Jan 29, 2026
Add CLAUDE_MODEL environment variable to hypershift-review-agent-process
step to pin the model version to claude-opus-4-5-20251101, following
the pattern established in PR openshift#70147 for hypershift-jira-agent.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bryan-cox
bryan-cox deleted the hypershift-jira-agent branch January 29, 2026 16:39
@openshift-bot

Copy link
Copy Markdown
Contributor

Issues in openshift/release go stale after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 15d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. rehearsals-ack Signifies that rehearsal jobs have been acknowledged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants